<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@	taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@	taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/tld/PagingA.tld" prefix="pagingTagA"%>

<section id="listResultSearch" class="boxSubject corner rightShadow">
	<div class="boxTitle topCorner3">
		<h2>Có <b>${countRecord}</b> truyện tranh theo thể loại  <b>${loaiTruyenTranh.name}</b></h2>
	</div>
	<ul>
		<c:choose>
			<c:when test="${lstSearchLoaiTruyenTranh.size() > 0}">
				<c:if test="${pInfo.totalPage > 1}">
					<section class="pagination">
						<spring:url value="/truyen-tranh/the-loai-${fn:replace(loaiTruyenTranh.alias,' ','-')}-TL${loaiTruyenTranh.id}" var="link" />
							<pagingTagA:paging searchUrl="${link}" curPageParam="-trang-" 
									searchValueParam=".htm" pagingInf="${pInfo}"></pagingTagA:paging>
					</section>
				</c:if>
				<c:forEach items="${lstSearchLoaiTruyenTranh}" var="item">
					<li class="corner3 rightShadow">
						<a class="corner3 buttonOrange" href='<spring:url value="/truyen-tranh/T${item.truyenTranh.id}/${fn:replace(item.truyenTranh.alias,' ','-')}.htm" />' title="Đọc truyện tranh ${item.truyenTranh.name}">Đọc truyện</a>
						<img class='corner tooltip' src='${item.truyenTranh.linkImage}/s182/${item.truyenTranh.nameImage}' alt='truyện tranh ${item.truyenTranh.name}' title="<h2>Tóm tắt truyện : ${item.truyenTranh.name}</h2>${item.truyenTranh.info}" />
						<div>
							<strong>${item.truyenTranh.name}</strong><br />
							<b>Tác giả: </b><span>${item.truyenTranh.tacGia.name}</span><br />
							<b>Thể loại: </b><span>${item.truyenTranh.categories}</span><br />
							<b>Người dịch: </b><span>${item.truyenTranh.translator}</span><br />
							<b>Số chương: </b><span><fmt:formatNumber type="number" maxIntegerDigits="4" value="${item.truyenTranh.totalChapter}" /></span><br />
							<b>Được thích: </b><span>${item.truyenTranh.liked}</span><br />
							<b>Lượt xem: </b><span>${item.truyenTranh.views}</span><br />
							<b>Tóm tắt:</b>
							<p>${item.truyenTranh.info}</p>
						</div>
					</li>
				</c:forEach>
				<c:if test="${pInfo.totalPage > 1}">
					<section class="pagination">
						<spring:url value="/truyen-tranh/the-loai-${fn:replace(loaiTruyenTranh.alias,' ','-')}-TL${loaiTruyenTranh.id}" var="link" />
							<pagingTagA:paging searchUrl="${link}" curPageParam="-trang-" 
									searchValueParam=".htm" pagingInf="${pInfo}"></pagingTagA:paging>
					</section>
				</c:if>
			</c:when>
			<c:otherwise><li>Đang cập nhật...</li></c:otherwise>
		</c:choose>
	</ul>
</section>